/* eslint-disable no-unused-vars */
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import {store} from './store/store'
// 引入echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts

// // 获取URL 参数
// const getUrlData = (d) => {
//   try {
//     let u = d.split('?')
//     u = u[1].split('&')
//     const get = {}
//     for (const i in u) {
//       const j = u[i].split('=')
//       get[j[0]] = j[1]
//     }
//     return get
//   } catch (error) {
//     const e = {
//       token: ''
//     }
//     return e
//   }
// }

// //  项目直接获取TOKEN
// // setToken('admin.713.14f9261847714693857a5212434555b7')
// console.log(getUrlData(window.location.href))
// if (getUrlData(window.location.href).token !== '') {
//   console.log(window.location.href)
//   console.log(getUrlData(window.location.href).token)
//   setToken(getUrlData(window.location.href).token)
// } else {
//   console.log('没有TOKEN')
// }

Vue.use(ElementUI)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  store: store, // 使用store
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
